<template>
  <div>
    <div>
      <van-button size="large" v-for="(item, index) in curriculum" :key="index" @click="$router.push({path: '/collectiveSing', query: {data: JSON.stringify(item)}})">{{ item.kcname }}签到记录</van-button>
    </div>
  </div>
</template>

<script>
import api from '@/api'
export default {
  name: 'student-edit',
  data () {
    return {
      curriculum: {}
    }
  },
  mounted () {
    this.collective()
  },
  methods: {
    // 集体签到记录 agencyCurriculumCollective
    collective () {
      let params = {
        // mechanism_id: JSON.parse(sessionStorage.getItem('user')).id
        mechanism_id: JSON.parse(sessionStorage.getItem('user')).id
      }
      api.agencyCurriculumCollective({
        params,
        callback: res => {
          console.log(res)
          this.curriculum = res.data.data
        }
      })
    }

  }
}
</script>

<style scoped>
  div {
    height: 100%;
    background-color: #F2F2F2;
  }

  .van-button {
    margin-top: 10px;
    height: 58px;
  }
</style>
